const border = require('../tw-lib-base/border/props')
const nodata = require('../tw-lib-base/no-data/props')

module.exports = {
  data: {
    type: Array,
    default () {
      return {
        list: [
        {
          title: '标题1',
          content: '内容1内1内容1内1内容1内1内容1内1内容1内1内容1内1内容1内1',
          child: [
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            },
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            },
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            }
          ]
        },
        {
          title: '标题2',
          content: '内容2',
          child: [
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            },
            {
              title: '标题2',
              content: '内容2'
            },
            {
              title: '标题2',
              content: '内容2'
            }
          ]
        },
        {
          title: '标题2',
          content: '内容2',
          child: [
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            },
            {
              title: '标题2',
              content: '内容2'
            },
            {
              title: '标题2',
              content: '内容2'
            }
          ]
        },
        {
          title: '标题2',
          content: '内容2',
          child: [
            {
              title: '标题2',
              content: '内容2',
              align: 'left'
            },
            {
              title: '标题2',
              content: '内容2'
            },
            {
              title: '标题2',
              content: '内容2'
            }
          ]
        },
        {
          title: '标题211',
          content: '内容211',
          child: [
            {
              title: '标题2',
              content: '内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2内容2',
              align: 'left'
            }
          ]
        }
      ],
      pageNum: 1,
      total: 20
    }
    },
    name: '',
    filedType: 'api'
  },

  columns: {
    type: String,
    default: '',
    name: '列数',
    nameTip: '每行显示多少项',
    filedType: 'string'
  },

  itemBg: {
    type: String,
    default: '#fff',
    name: '列表项背景色',
    filedType: 'color'
  },
  isColumnBg: {
    type: Boolean,
    default: false,
    name: '启用间隔背景',
    filedType: 'switch'
  },
  itemBg1: {
    type: String,
    default: '#e2e8ee',
    name: '列表项偶数背景',
    filedType: 'color'
  },
  itemHeight: {
    type: String,
    default: '',
    name: '列表项高度',
    filedType: 'string'
  },

  itemSpacing: {
    type: String,
    default: '0px',
    name: '列表项间距',
    filedType: 'string'
  },

  itemPadding: {
    type: String,
    default: '10px',
    name: '项内边距',
    filedType: 'string'
  },

  isColumn: {
    type: Boolean,
    default: true,
    name: '是否垂直排列',
    filedType: 'switch',
    vif: {
      key: 'columns',
      value: ''
    }
  },

  headPadding: {
    type: String,
    default: '0px 0px 10px 0',
    name: '标题区内边距',
    filedType: 'string'
  },
  childPadding: {
    type: String,
    default: '5px 20px',
    name: '内容区内边距',
    filedType: 'string'
  },

  childBgColor: {
    type: String,
    default: '#e2e8ee',
    name: '内容区背景颜色',
    filedType: 'color'
  },

  childBorderRadius: {
    type: String,
    default: '10px',
    name: '内容区圆角尺寸',
    filedType: 'string'
  },

  childItemPadding: {
    type: String,
    default: '15px 0',
    name: '内容区项目内边距',
    filedType: 'string'
  },

  childItemBoder: {
    type: String,
    default: '1px solid #fff',
    name: '内容区项目分割线',
    filedType: 'string'
  },
  titleHeadFontSize: {
    type: String,
    default: '14px',
    name: '标题区标题字体大小',
    filedType: 'string'
  },

  titleHeadFontColor: {
    type: String,
    default: '#333333',
    name: '标题区标题字体颜色',
    filedType: 'color'
  },

  desHeadFontSize: {
    type: String,
    default: '14px',
    name: '标题区描述字体大小',
    filedType: 'string'
  },

  desHeadFontColor: {
    type: String,
    default: '#666666',
    name: '标题区描述字体颜色',
    filedType: 'color'
  },

  titleFontSize: {
    type: String,
    default: '14px',
    name: '内容区标题字体大小',
    filedType: 'string'
  },

  titleFontColor: {
    type: String,
    default: '#333333',
    name: '内容区标题字体颜色',
    filedType: 'color'
  },

  familyText: {
    type: String,
    default: '',
    name: '文本字体类型',
    filedType: 'string'
  },

  desFontSize: {
    type: String,
    default: '14px',
    name: '内容区描述字体大小',
    filedType: 'string'
  },

  desFontColor: {
    type: String,
    default: '#666666',
    name: '内容区描述字体颜色',
    filedType: 'color'
  },

  itemBorderRadius: {
    type: String,
    default: '0px',
    name: '圆角尺寸',
    filedType: 'string'
  },

  showMulText: {
    type: Boolean,
    default: false,
    name: '内容允许换行',
    filedType: 'switch'
  },
  mulTextLine: {
    type: String,
    default: '0',
    name: '内容显示行数',
    filedType: 'string',
    vif: {
      key: 'showMulText',
      value: true
    }
  },

  showLine: {
    type: Boolean,
    default: false,
    name: '显示项间分割线',
    filedType: 'switch'
  },
  itemBorderColor: {
    type: String,
    default: '#ccc',
    name: '项间分割线颜色',
    filedType: 'color'
  },
  itemBorderType: {
    type: Array,
    default: 'solid',
    name: '项间分割线样式',
    filedType: 'select',
    options: [
      {
        name: '实线',
        value: 'solid'
      },
      {
        name: '虚线',
        value: 'dashed'
      },
      {
        name: '点划线',
        value: 'dotted'
      }
    ]
  },

  useLazeLoad: {
    type: Boolean,
    default: true,
    name: '使用懒加载',
    filedType: 'switch'
  },
  value: {
    type: Number,
    default: 1,
    name: '懒加载当前页',
    filedType: 'value'
  },

  pageSize: {
    type: Number,
    default: 10,
    name: '懒加载每页行数',
    filedType: 'string'
  },
  useClick: {
    type: Boolean,
    default: false,
    name: '启用选中项目',
    filedType: 'switch'
  },
  syncFunc: {
    type: Function,
    default: '',
    name: '自定义转换函数',
    nameTip: '第一个参数原数据，第二个参数新添加的数据，需要return',
    filedType: 'function'
  },

  ...border,
  ...nodata
}
